// app.js
App({
  towxml:require('/towxml/index'),
  getText: (url, callback) => {
    wx.request({
     url: url,
     header: {
      'content-type': 'application/x-www-form-urlencoded'
     },
     success: (res) => {
      if (typeof callback === 'function') {
       callback(res);
      };
     }
    });
   },
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  globalData: {
    userInfo: null,
    unionid: "",
    access_key:"",
    token:"lims",
    localuserinfo: {},
    score_item: '',
    url:"",
    checkin_url:"https://seu.jiaozuoye.online",
    support_url:"https://support.jiaozuoye.online",
    room:{},
  }
})
